<?php
/**
 * Created by PhpStorm.
 * User: GZ-1
 * Date: 2017/6/7
 * Time: 11:40
 */

include_once "../util.php";

$setings=$_REQUEST['setings'];
$usid=$_REQUEST['usid'];
$setings=json_decode($setings);
$setings=objectToArray($setings);
$setings=json_encode($setings);

$sql ="UPDATE `users` SET `setting`='$setings' WHERE `usid`='$usid'";
$result=mysqli_query($conn,$sql);
if($result){
    echo json_encode(array(
        'stats'=>1
    ));
}else{
    echo json_encode(array(
        'stats'=>0,
        'msg'=>'设置失败'
    ));
}



